package com.maimao.spider.mapper;

import com.maimao.spider.model.Brand;
import com.maimao.spider.model.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/11/24 9:33 下午
 */
@Mapper
public interface BrandMapper {


    void insertBatch(@Param("brandList") List<Brand> brandList);

    void insertCateBrandBatch(@Param("brandIdList")List<Long> brandIdList, @Param("cateId")Integer cateId);
    void insertCateBrand(@Param("brandId")Long brandId,@Param("cateId")Integer cateId);

    List<Brand> selectAll();

    Brand selectIdByName(String brandName);

    int insertBrand(Brand brand);

    List<Long> selectBrandIdByCateId(int cateId);
}
